//#define _CRT_SECURE_NO_WARNINGS 1
#include "Sort.h"

void test01()
{
	int a[] = { 7,1,3,2,4,5,10,6,8,9 };
	PrintArry(&a, sizeof(a) / sizeof(int));
	InsertSort(&a, sizeof(a) / sizeof(int));
	PrintArry(&a, sizeof(a) / sizeof(int));

}

void test02()
{
	int a[] = { 7,1,3,2,4,5,10,6,8,9 };
	PrintArry(&a, sizeof(a) / sizeof(a[0]));
	ShellSort(&a, sizeof(a) / sizeof(a[0]));
	PrintArry(&a, sizeof(a) / sizeof(a[0]));
}

void test03()
{
	int a[] = { 7,1,3,2,4,5,10,6,8,9 };
	PrintArry(&a, sizeof(a) / sizeof(a[0]));
	SelectSort(&a, sizeof(a) / sizeof(a[0]));
	PrintArry(&a, sizeof(a) / sizeof(a[0]));
}

void test04()
{
	int a[] = { 7,1,3,2,4,5,10,6,8,9 };
	PrintArry(&a, sizeof(a) / sizeof(a[0]));
	HeapSort(&a, sizeof(a) / sizeof(a[0]));
	PrintArry(&a, sizeof(a) / sizeof(a[0]));
}

void test05()
{
	int a[] = { 7,1,3,2,4,5,10,6,8,9 };
	PrintArry(&a, sizeof(a) / sizeof(a[0]));
	BubbleSort(&a, sizeof(a) / sizeof(a[0]));
	PrintArry(&a, sizeof(a) / sizeof(a[0]));
}

void test06()
{
	int a[] = { 7,1,3,2,4,5,10,6,8,9 };
	PrintArry(&a, sizeof(a) / sizeof(a[0]));
	QuickSort(&a,0, sizeof(a) / sizeof(a[0])-1);
	PrintArry(&a, sizeof(a) / sizeof(a[0]));

}

void test07()
{
	int a[] = { 7,1,3,2,4,5,10,6,8,9 };
	PrintArry(&a, sizeof(a) / sizeof(a[0]));
	QuickSortNonR(&a, 0, sizeof(a) / sizeof(a[0]) - 1);
	PrintArry(&a, sizeof(a) / sizeof(a[0]));

}

void test08()
{
	int a[] = { 7,1,3,2,4,5,10,6,8,9 };
	PrintArry(&a, sizeof(a) / sizeof(a[0]));
	MergeSort(&a, sizeof(a) / sizeof(int));
	PrintArry(&a, sizeof(a) / sizeof(a[0]));

}

void test09()
{
	int a[] = { 7,1,3,2,4,5,10,6,8,9 };
	PrintArry(&a, sizeof(a) / sizeof(a[0]));
	MergeSortNonR(&a, sizeof(a) / sizeof(int));
	PrintArry(&a, sizeof(a) / sizeof(a[0]));

}

void test10()
{
	int a[] = { 7,1,3,2,4,5,10,6,8,9 };
	PrintArry(&a, sizeof(a) / sizeof(a[0]));
	CountSort(&a, sizeof(a) / sizeof(int));
	PrintArry(&a, sizeof(a) / sizeof(a[0]));

}

void test11()
{
	int a[] = { 278,109,63,930,589,184,505,269,8,83 };
	PrintArry(&a, sizeof(a) / sizeof(a[0]));
	Radixsort(&a, 0, sizeof(a) / sizeof(a[0]));
	PrintArry(&a, sizeof(a) / sizeof(a[0]));

}


int main()
{
	//test01();
	//test02();
	//test03();
	//test04();
	//test05();
	//test06();
	//test07();
	//test08();
	//test09();
	//test10();
	test11();


	return 0;
}